home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / gfx / misc / SvII-1.lha / SViewII / ARexx-Scripts / ConvertAnyFile.rx next >
Text File  |  1999-02-20  |  1KB  |  72 lines

  1. /*
  2.    $VER: ConvertAnyFile.rx V8.00 (22.7.98)
  3.    © 1993-98 by Andreas R. Kleinert
  4.  
  5.    This script demonstrates loading, saving (converting) and
  6.    displaying files by using SViewII's ARexxPort.
  7.  
  8.    USAGE: RX ConvertAnyFile InFile OutFile
  9.  
  10. */
  11.  
  12. parse arg sourcefile destfile
  13.  
  14. sourcefile = strip(sourcefile)
  15. destfile = strip(destfile)
  16.  
  17. address command
  18.  
  19. SViewII "-INSTALL_APPMENU=FALSE -INSTALL_APPICON=FALSE"
  20.  
  21. say ""
  22. say "ARexx: SViewII has been started : Waiting a moment..."
  23.  
  24. wait 5
  25.  
  26. OPTIONS RESULTS
  27. SIGNAL ON ERROR
  28. SVIIPORT = 'SViewII.rx'
  29. SVNGPORT = 'SViewNG.rx'
  30. SVPORT   = 'SuperView.rx'
  31.  
  32. IF ~SHOW('P',SVPORT) THEN SVPORT = SVNGPORT
  33. IF ~SHOW('P',SVPORT) THEN SVPORT = SVIIPORT
  34. IF ~SHOW('P',SVPORT) THEN DO
  35.   say "Could not locate ARexx port of SViewII !"
  36.   CALL ErrorOut 0
  37. END
  38.  
  39. ADDRESS VALUE SVPORT
  40.  
  41. say "ARexx: Loading a PCX Graphics via the LOAD command"
  42. 'LOAD='||sourcefile
  43.  
  44. say "ARexx: Saving Graphics as IFF ILBM"
  45.  
  46. 'SAVE_TYPE=ILBM CmpByteRun1'
  47. 'SAVE='||destfile
  48.  
  49. address command wait 3
  50.  
  51. say "ARexx: Load this ILBM Gfx now for control"
  52.  
  53. 'SHOW='||destfile
  54.  
  55. say "ARexx: O.K. : Let's quit !"
  56.  
  57. address command Wait 2
  58.  
  59. 'QUIT'
  60.  
  61. CALL ErrorOut 0
  62.  
  63.  
  64. /* Errorout procedure ----------------------- */
  65.  
  66. ErrorOut:
  67.         PARSE ARG ExitCode
  68.  
  69.         EXIT ExitCode
  70.  
  71.   END
  72.